﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace WCFClient
{
    class Program
    {
        static void Main(string[] args)
        {

            ResponseService callBack = new ResponseService();
            InstanceContext instanceContext = new InstanceContext(callBack);
            ChannelFactory<WCFContracts.IRequestContract> cf = new DuplexChannelFactory<WCFContracts.IRequestContract>(instanceContext, new System.ServiceModel.NetTcpBinding());
            WCFContracts.IRequestContract request = cf.CreateChannel(new EndpointAddress("net.tcp://localhost:9875"));
            request.Request("Hello world!");

            Console.ReadLine();

        }
    }
}
